<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS3 盒模型大小</title>
    <style type="text/css">
        div{
            width: 200px;
            height:100px;
            padding: 10px;
            border: 10px solid #999;
        }
        #box1{
            box-sizing: content-box;
            margin-bottom: 10px;
            background-color: #eee;
        }
        #box2{
            box-sizing: border-box;
            background-color: #eee;
        }
    </style>
</head>
<body>
<div id="box1">这个盒子大小为240*140px，内容区为200*100px</div>
<div id="box2">这个盒子大小为200*100px，内容区为60*160px</div>
</body>
</html>